package com.lagou;

import com.lagou.service.IUserService;
import com.lagou.service.UserServiceImpl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class SpringbootRpcServerApplication {

    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(SpringbootRpcServerApplication.class, args);
        try {
            ((UserServiceImpl) context.getBean(IUserService.class)).startServer("127.0.0.1", 8999);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

}
